package com.ezops.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonProperty;

public class MasterAggrementAgreementCountModel implements Serializable {

	public static List<MasterAggrementAgreementCountModel> adaptTo(
			Map<String, List<Integer>> data) {
		List<MasterAggrementAgreementCountModel> allModels = new ArrayList<>(
				data.size());
		for (Map.Entry<String, List<Integer>> entry : data.entrySet()) {
			MasterAggrementAgreementCountModel model = new MasterAggrementAgreementCountModel();
			model.setData(entry.getValue());
			model.setValue(entry.getKey());
			allModels.add(model);
		}

		return allModels;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = -646051261735712924L;
	@JsonProperty("name")
	private String value;
	private List<Integer> data;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public List<Integer> getData() {
		return data;
	}

	public void setData(List<Integer> data) {
		this.data = data;
	}

}
